package com.auxgroup.hr.front.dao.repository;

import com.auxgroup.hr.front.dao.domain.PsContractData;
import com.auxgroup.hr.front.dao.domain.PsJob;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by nitongqian on 2019/1/18.
 */
@Repository
public interface PsContractDataRepository extends
        JpaRepository<PsContractData,String>,JpaSpecificationExecutor<PsContractData> {

    @Query(value = "FROM PsContractData pj where pj.emplid = :emplid and pj.contractStatus='A'")
    List<PsContractData> findInterns(@Param("emplid") String emplid);

    List<PsContractData> findByEmplid(String emplid);
}
